Skip to content

Conversation

@kitsonk
Copy link
Collaborator

@kitsonk kitsonk commented Aug 8, 2025

Mitigate ReDoS vulnerability in x-forwarded-for and x-forwarded-proto header parsing by replacing regex with safer string operations and adding input bounds.

The previous regex-based splitting of x-forwarded-for and x-forwarded-proto headers could be vulnerable to ReDoS (Regular Expression Denial of Service) with crafted inputs. This PR replaces regex with simple split operations, adds length limits, and validates protocol values to prevent catastrophic backtracking and limit resource consumption.


Open in Cursor Open in Web

@cursor
Copy link

cursor bot commented Aug 8, 2025

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

@CLAassistant
Copy link

CLAassistant commented Aug 8, 2025

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ kitsonk
❌ cursoragent
You have signed the CLA already but the status is still pending? Let us recheck it.

@kitsonk kitsonk marked this pull request as ready for review August 8, 2025 23:02
@kitsonk kitsonk merged commit b60e603 into main Aug 8, 2025
2 of 3 checks passed
@kitsonk kitsonk deleted the cursor/address-redos-vulnerability-in-headers-91d9 branch August 8, 2025 23:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants